package com.atguigu.gmall.publisher.controller;


import com.alibaba.fastjson.JSON;
import com.atguigu.gmall.publisher.service.DauService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
public class VisitController {

    @Autowired
    DauService dauService;

    @GetMapping("/dauRealtime")
    public String   getDauRealtime(@RequestParam("td") String today){
         Map dauResultMap=   dauService.getDauRealtime(today);
         String json = JSON.toJSONString(dauResultMap);
         return  json;
    }


}
